package com.xwh.shop.user.service.handlers;

/**
 * 线程上下文处理器
 * @author xwh
 * @since 2025-07-02
 */
public class BaseContextHandler {

    private static final ThreadLocal<Long> context = new ThreadLocal<>();

    public static void set(Long userId) {
        context.set(userId);
    }

    public static Long get() {
        return context.get();
    }

    public static void remove() {
        context.remove();
    }
}
